package com.lm.upms.api.feign.fallback;

import com.lm.upms.api.entity.SysOperLog;
import com.lm.upms.api.feign.RemoteLogService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author lm
 * @date 2019/7/8 11:36
 */
@Component
public class RemoteLogServiceFallbackImpl implements RemoteLogService {

    private final static Logger logger = LoggerFactory.getLogger(RemoteLogServiceFallbackImpl.class);

    private Throwable cause;

    public void setCause(Throwable cause) {
        this.cause = cause;
    }

    /**
     * 保存日志
     *
     * @param sysOperLog
     * @return
     */
    @Override
    public void saveOperLog(SysOperLog sysOperLog) {
        logger.error("feign 插入日志失败", cause);
    }

}